package com.quiz.bis.controller;


import com.quiz.bis.domain.vo.StudentMemberVo;
import com.quiz.bis.service.IStudentMemberService;
import com.quiz.common.core.controller.BaseController;
import com.quiz.common.mybatis.core.page.PageQuery;
import com.quiz.common.mybatis.core.page.TableDataInfo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * 学生成员管理控制器
 * @author ahuan
 */
@RestController
@RequestMapping("/student/group/member")
@Tag(name = "学生成员管理")
@RequiredArgsConstructor
public class StudentMemberController extends BaseController {
    private final IStudentMemberService studentMemberService;

    /**
     * 分页查询考试组成员列表
     *
     * @param groupId 考试组ID
     * @param pageQuery 分页参数
     * @return 成员列表
     */
    @GetMapping("/list")
    @Operation(summary = "获取考试组成员列表")
    public TableDataInfo<StudentMemberVo> list(@RequestParam Long groupId,
                                               @Validated PageQuery pageQuery) {
        return studentMemberService.pageMemberList(groupId, pageQuery);
    }
}